The present invention generally relates to processing of image data and more particularly to an image data processing method for compressing two-dimensional curve image data and for expanding the information thus compressed.
In a field of image processing, a two-dimensional curve image is usually decomposed into a number of segments, and vectors are assigned in correspondence to each of the segments. Thus, the curve is represented by a number of vectors each corresponding to the segment. In such a method, when the curve has a large curvature, a large number of vectors are needed. Associated therewith, information to be processed is increased, which causes a difficulty in transmission or storage in memory. Further, such a method has a problem of synthesizing a smooth curve as the synthesis of the curve is made on the basis of connection of a number of these segments.
In order to avoid these problems, there has been proposed to use the Bezier's equation for approximation of the curve. According to this method, the curve is approximated by the following equation: EQU B(X,Y)=A(1-t)+3P'(1-t).sup.2 t +3Q(1-t)t.sup.2 +Et.sup.3 ( 1)
where B(X,Y) represents a coordinate of the two-dimensional curve, A and E respectively stand for an initial point and a terminal point of the curve, P' and Q' respectively stand for an initial point and a terminal point of a line which characterizes the shape of the curve and also tangential directions at points A and E, and t stands for a parameter specifying position of a point on the curve between the point A and the point E. The parameter t assumes a value zero (0) at the point A and a value one (1) at the point E. According to Eq.(1), the curve is characterized by only four points A, E, P' and Q'.
FIGS. 1(A) and (B) show typical examples of such curves B.sub.1 -B.sub.6, or B.sub.1 '-B.sub.6 ' wherein the shape of the curve is determined by the coordinate of the initial point A and the terminal point E as well as initial points P.sub.1 '-P.sub.6 ' and terminal points Q.sub.1 '-Q.sub.6, corresponding to the points P' and Q'.
As can be seen from these drawings, segments P1'Q1', P2'Q2', P3'Q3' . . . respectively connecting the points P.sub.1 ' and Q.sub.1 ', P.sub.2 ' and Q.sub.2 ', P.sub.3 ' and Q.sub.3 ' . . . do not make contact with respective curves and because of this, there arises a problem in that the curve generated from given control points does not closely reproduce the original image formed in a bit map. In relation with this, automatic contour coding or data compression of the image becomes difficult as the curves which can closely represent the image on the bit map has to be specified by the control points which are not on the edge of the image. Further, when the curve is located close to a marginal region of the image to be processed, there appears a case in which the points P' and Q' are located outside of image field secured for storing a bit map. In such a case, one has to provide additional memory field in correspondence to coordinates outside of the image field for accommodating these coordinate data. Such a procedure invites unwanted increase of memory space or amount of information to be processed.